import Mock from 'mockjs';

const Random = Mock.Random;

const users = function() {
    let data = [];
    data.push({
        email: "good@saxobank.com",
        password: "doog123"
    });
    
    for(let i = 0; i < 3; i++) {
        let _data = {
            email: Random.email(),
            password: Random.word()
        }
        data.push(_data);
        
    }
    console.log("async");
    return {
        data: data
    }
}
// simulate waiting time
Mock.setup({ timeout: 1000 });

Mock.mock('/users', 'get', users);